/******************************************************************************* 
 * Copyright (C) 2012-2015 Microfountain Technology, Inc. All Rights Reserved. 
 * 
 * Unauthorized copying of this file, via any medium is strictly prohibited.   
 * Proprietary and confidential
 * 
 * Last Modified: 2015-9-18 15:23:40
 ******************************************************************************/
package cn.com.xy.sms.sdk.net;

import java.net.HttpURLConnection;

import cn.com.xy.sms.sdk.Iservice.XyCallBack;

/**
 * java.net.*
 * 
 * @author Administrator
 */
public class SdkXyHttpRunnable extends BaseHttpRunnable {

    private int sceneType = -1;

    public SdkXyHttpRunnable(int cmd, int sceneType, String url,
            String content, XyCallBack callBack, boolean isCompress) {
        super(url, null, content, false, null, callBack, isCompress);
        this.sceneType = sceneType;
    }

    /* SDK-575 huangzhiqiang 20160802 start */
    @Override
    public void setHttpHeader(HttpHeaderDto hhd, boolean isLogin, String cmd,
            HttpURLConnection http) throws Exception {
        super.setHttpHeader(hhd, isLogin, cmd, http);
        http.addRequestProperty("sceneType", sceneType + "");
        http.addRequestProperty("reqVersion", "5.1.2");
        http.addRequestProperty("clientKey", cn.com.xy.sms.sdk.net.XyHttpRunnable.appKey);
        http.addRequestProperty("client_key", "123456");// 这个key不能动
    }
    /* SDK-575 huangzhiqiang 20160802 end */
}
